<template>
    <div>

        <nav-header>
            <template v-slot:title>我的粉丝</template>
        </nav-header>

        <p></p>

        <nav-tab :data="navData"></nav-tab>

        <div class="container-fluid" style="margin-top: 10px;">

            <div v-for="(item, i) in data" class="row member-item">
                <div class="col-xs-6">
<!--                    <img style="width: 60px;border-radius: 50%;position: absolute;left: 0;"-->
<!--                         :src="item.avatar"/>-->
<!--                    <div style="position:absolute;left: 120px;font-size: 20px;line-height: 60px;">{{item.nickname + '('-->
<!--                        + item.promotes + ')'}}-->
<!--                    </div>-->
                        <img style="width: 50px;border-radius: 50%;margin-right: 10px;" :src="item.avatar" />
                        <span style="">{{item.nickname}}</span>
                </div>
                <div class="col-xs-6">
<!--                    <div v-if="i == 0" style="line-height: 60px;text-align: right;font-size: 20px;">①</div>-->
<!--                    <div v-if="i == 1" style="line-height: 60px;text-align: right;font-size: 20px;">②</div>-->
<!--                    <div v-if="i == 2" style="line-height: 60px;text-align: right;font-size: 20px;">③</div>-->
                    <div v-if="item.lv1_uid == uid" style="line-height: 50px;text-align: right;font-size: 20px;">①</div>
                    <div v-if="item.lv2_uid == uid" style="line-height: 50px;text-align: right;font-size: 20px;">②</div>
                </div>
            </div>

        </div>


    </div>
</template>
<script>
    import NavTab from "../Widget/NavTab";
    import NavHeader from "../Layout/NavHeader";

    export default {
        components: {NavTab, NavHeader},
        data() {
            return {
                navData: [
                    {
                        label: '推广粉丝',
                        active: true,
                    },
                ],
                data: [
                    // {
                    //     avatar: '',
                    //     name: '',
                    // }
                ],
                uid: 0,
            }
        },
        created() {
        },
        mounted() {
            this.getMember();
        },
        methods: {
            getMember() {
                let that = this;
                let wx_openid = localStorage.getItem('wx_openid');
                this.api.getMember(wx_openid).then(res => {
                    if (res.data) {
                        that.data = res.data.list;
                        that.uid = res.data.uid;
                    }
                })
            }
        },
    }
</script>
<style>

    .member-item {
        background-color: #fff;
        border-radius: 60px;
        padding: 10px;
        margin-bottom: 10px;
        box-shadow: 0 3px 3px 2px #eeeeee;
    }

</style>
